namespace ext.form
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.  Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
	/// the Form needs to perform an action such as submit or load. The Configuration options
	/// listed for this class are set through the Form&apos;s action methods: {@link Ext.form.BasicForm#submit submit},
	/// {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}  The instance of Action which performed the action is passed to the success
	/// and failure callbacks of the Form&apos;s action methods ({@link Ext.form.BasicForm#submit submit},
	/// {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}),
	/// and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and
	/// {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers.
	/// </summary>
	/// <htmlSummary>
	/// &lt;p&gt;The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.&lt;/p&gt;
	/// &lt;p&gt;Instances of this class are only created by a {@link Ext.form.BasicForm Form} when
	/// the Form needs to perform an action such as submit or load. The Configuration options
	/// listed for this class are set through the Form&apos;s action methods: {@link Ext.form.BasicForm#submit submit},
	/// {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}&lt;/p&gt;
	/// &lt;p&gt;The instance of Action which performed the action is passed to the success
	/// and failure callbacks of the Form&apos;s action methods ({@link Ext.form.BasicForm#submit submit},
	/// {@link Ext.form.BasicForm#load load} and {@link Ext.form.BasicForm#doAction doAction}),
	/// and to the {@link Ext.form.BasicForm#actioncomplete actioncomplete} and
	/// {@link Ext.form.BasicForm#actionfailed actionfailed} event handlers.&lt;/p&gt;
	/// </htmlSummary>
	/// <definedin>src\widgets\form\Action.js</definedin>
	[ScriptName("Action")]
	[ScriptNamespace("Ext.form")]
	[Imported()]
	public partial class Action
	{
		
		#region Constructors
		public Action(ext.form.Action_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public Action()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>The URL that the Action is to invoke.</summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("url")]
		public string Url;
		
		/// <summary>
		/// When set to true, causes the Form to be
		/// {@link Ext.form.BasicForm.reset reset} on Action success. If specified, this happens
		/// before the {@link #success} callback is called and before the Form&apos;s
		/// {@link Ext.form.BasicForm.actioncomplete actioncomplete} event fires.
		/// </summary>
		/// <htmlSummary>
		/// When set to &lt;tt&gt;&lt;b&gt;true&lt;/b&gt;&lt;/tt&gt;, causes the Form to be
		/// {@link Ext.form.BasicForm.reset reset} on Action success. If specified, this happens
		/// &lt;b&gt;before&lt;/b&gt; the {@link #success} callback is called and before the Form&apos;s
		/// {@link Ext.form.BasicForm.actioncomplete actioncomplete} event fires.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("reset")]
		public bool Reset;
		
		/// <summary>
		/// The HTTP method to use to access the requested URL. Defaults to the
		/// {@link Ext.form.BasicForm}&apos;s method, or if that is not specified, the underlying DOM form&apos;s method.
		/// </summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("method")]
		public string Method;
		
		/// <summary>
		/// Extra parameter values to pass. These are added to the Form&apos;s
		/// {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form&apos;s
		/// input fields.  Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;Extra parameter values to pass. These are added to the Form&apos;s
		/// {@link Ext.form.BasicForm#baseParams} and passed to the specified URL along with the Form&apos;s
		/// input fields.&lt;/p&gt;
		/// &lt;p&gt;Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("params")]
		public object Params;
		
		/// <summary>
		/// The number of seconds to wait for a server response before
		/// failing with the {@link #failureType} as {@link #Action.CONNECT_FAILURE}. If not specified,
		/// defaults to the configured {@link Ext.form.BasicForm#timeout timeout} of the
		/// {@link Ext.form.BasicForm form}.
		/// </summary>
		/// <htmlSummary>
		/// The number of seconds to wait for a server response before
		/// failing with the {@link #failureType} as {@link #Action.CONNECT_FAILURE}. If not specified,
		/// defaults to the configured &lt;tt&gt;{@link Ext.form.BasicForm#timeout timeout}&lt;/tt&gt; of the
		/// {@link Ext.form.BasicForm form}.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("timeout")]
		public System.Number Timeout;
		
		/// <summary>
		/// The function to call when a valid success return packet is recieved.
		/// The function is passed the following parameters:  form : Ext.form.BasicForm The form that requested the action   action : Ext.form.Action The Action class. The {@link #result}
		/// property of this object may be examined to perform custom postprocessing.
		/// </summary>
		/// <htmlSummary>
		/// The function to call when a valid success return packet is recieved.
		/// The function is passed the following parameters:&lt;ul class=&quot;mdetail-params&quot;&gt;
		/// &lt;li&gt;&lt;b&gt;form&lt;/b&gt; : Ext.form.BasicForm&lt;div class=&quot;sub-desc&quot;&gt;The form that requested the action&lt;/div&gt;&lt;/li&gt;
		/// &lt;li&gt;&lt;b&gt;action&lt;/b&gt; : Ext.form.Action&lt;div class=&quot;sub-desc&quot;&gt;The Action class. The {@link #result}
		/// property of this object may be examined to perform custom postprocessing.&lt;/div&gt;&lt;/li&gt;
		/// &lt;/ul&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("success")]
		public System.Delegate Success;
		
		/// <summary>
		/// The function to call when a failure packet was recieved, or when an
		/// error ocurred in the Ajax communication.
		/// The function is passed the following parameters:  form : Ext.form.BasicForm The form that requested the action   action : Ext.form.Action The Action class. If an Ajax
		/// error ocurred, the failure type will be in {@link #failureType}. The {@link #result}
		/// property of this object may be examined to perform custom postprocessing.
		/// </summary>
		/// <htmlSummary>
		/// The function to call when a failure packet was recieved, or when an
		/// error ocurred in the Ajax communication.
		/// The function is passed the following parameters:&lt;ul class=&quot;mdetail-params&quot;&gt;
		/// &lt;li&gt;&lt;b&gt;form&lt;/b&gt; : Ext.form.BasicForm&lt;div class=&quot;sub-desc&quot;&gt;The form that requested the action&lt;/div&gt;&lt;/li&gt;
		/// &lt;li&gt;&lt;b&gt;action&lt;/b&gt; : Ext.form.Action&lt;div class=&quot;sub-desc&quot;&gt;The Action class. If an Ajax
		/// error ocurred, the failure type will be in {@link #failureType}. The {@link #result}
		/// property of this object may be examined to perform custom postprocessing.&lt;/div&gt;&lt;/li&gt;
		/// &lt;/ul&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("failure")]
		public System.Delegate Failure;
		
		/// <summary>
		/// The scope in which to call the callback functions (The this reference
		/// for the callback functions).
		/// </summary>
		/// <htmlSummary>
		/// The scope in which to call the callback functions (The &lt;tt&gt;this&lt;/tt&gt; reference
		/// for the callback functions).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("scope")]
		public object Scope;
		
		/// <summary>
		/// The message to be displayed by a call to {@link Ext.MessageBox#wait}
		/// during the time the action is being processed.
		/// </summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("waitMsg")]
		public string WaitMsg;
		
		/// <summary>
		/// The title to be displayed by a call to {@link Ext.MessageBox#wait}
		/// during the time the action is being processed.
		/// </summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("waitTitle")]
		public string WaitTitle;
		
		/// <summary>
		/// If set to true, the emptyText value will be sent with the form
		/// when it is submitted. Defaults to true.
		/// </summary>
		/// <htmlSummary>
		/// If set to &lt;tt&gt;true&lt;/tt&gt;, the emptyText value will be sent with the form
		/// when it is submitted. Defaults to &lt;tt&gt;true&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("submitEmptyText")]
		public bool SubmitEmptyText;
		#endregion
		
		#region Properties
		/// <summary>
		/// Failure type returned when client side validation of the Form fails
		/// thus aborting a submit action. Client side validation is performed unless
		/// {@link #clientValidation} is explicitly set to false.
		/// </summary>
		/// <htmlSummary>
		/// Failure type returned when client side validation of the Form fails
		/// thus aborting a submit action. Client side validation is performed unless
		/// {@link #clientValidation} is explicitly set to &lt;tt&gt;false&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("CLIENT_INVALID")]
		[IntrinsicProperty()]
		public static string CLIENT_INVALID
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
		}
		
		/// <summary>
		/// Failure type returned when server side processing fails and the {@link #result}&apos;s
		/// success property is set to false.  In the case of a form submission, field-specific error messages may be returned in the
		/// {@link #result}&apos;s errors property.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;Failure type returned when server side processing fails and the {@link #result}&apos;s
		/// &lt;tt style=&quot;font-weight:bold&quot;&gt;success&lt;/tt&gt; property is set to &lt;tt&gt;false&lt;/tt&gt;.&lt;/p&gt;
		/// &lt;p&gt;In the case of a form submission, field-specific error messages may be returned in the
		/// {@link #result}&apos;s &lt;tt style=&quot;font-weight:bold&quot;&gt;errors&lt;/tt&gt; property.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("SERVER_INVALID")]
		[IntrinsicProperty()]
		public static string SERVER_INVALID
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
		}
		
		/// <summary>
		/// Failure type returned when a communication error happens when attempting
		/// to send a request to the remote server. The {@link #response} may be examined to
		/// provide further information.
		/// </summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("CONNECT_FAILURE")]
		[IntrinsicProperty()]
		public static string CONNECT_FAILURE
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
		}
		
		/// <summary>
		/// Failure type returned when the response&apos;s success
		/// property is set to false, or no field values are returned in the response&apos;s
		/// data property.
		/// </summary>
		/// <htmlSummary>
		/// Failure type returned when the response&apos;s &lt;tt style=&quot;font-weight:bold&quot;&gt;success&lt;/tt&gt;
		/// property is set to &lt;tt&gt;false&lt;/tt&gt;, or no field values are returned in the response&apos;s
		/// &lt;tt style=&quot;font-weight:bold&quot;&gt;data&lt;/tt&gt; property.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("LOAD_FAILURE")]
		[IntrinsicProperty()]
		public static string LOAD_FAILURE
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
		}
		
		/// <summary>
		/// The type of action this Action instance performs.
		/// Currently only &quot;submit&quot; and &quot;load&quot; are supported.
		/// </summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("type")]
		[IntrinsicProperty()]
		public string Type
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>
		/// The type of failure detected will be one of these: {@link #CLIENT_INVALID},
		/// {@link #SERVER_INVALID}, {@link #CONNECT_FAILURE}, or {@link #LOAD_FAILURE}. Usage:
		/// 
		/// var fp = new Ext.form.FormPanel({
		/// ...
		/// buttons: [{
		/// text: &apos;Save&apos;,
		/// formBind: true,
		/// handler: function(){
		/// if(fp.getForm().isValid()){
		/// fp.getForm().submit({
		/// url: &apos;form-submit.php&apos;,
		/// waitMsg: &apos;Submitting your data...&apos;,
		/// success: function(form, action){
		/// // server responded with success = true
		/// var result = action.{@link #result};
		/// },
		/// failure: function(form, action){
		/// if (action.{@link #failureType} === Ext.form.Action.{@link #CONNECT_FAILURE}) {
		/// Ext.Msg.alert(&apos;Error&apos;,
		/// &apos;Status:&apos;+action.{@link #response}.status+&apos;: &apos;+
		/// action.{@link #response}.statusText);
		/// }
		/// if (action.failureType === Ext.form.Action.{@link #SERVER_INVALID}){
		/// // server responded with success = false
		/// Ext.Msg.alert(&apos;Invalid&apos;, action.{@link #result}.errormsg);
		/// }
		/// }
		/// });
		/// }
		/// }
		/// },{
		/// text: &apos;Reset&apos;,
		/// handler: function(){
		/// fp.getForm().reset();
		/// }
		/// }]
		/// </summary>
		/// <htmlSummary>
		/// The type of failure detected will be one of these: {@link #CLIENT_INVALID},
		/// {@link #SERVER_INVALID}, {@link #CONNECT_FAILURE}, or {@link #LOAD_FAILURE}. Usage:
		/// &lt;pre&gt;&lt;code&gt;
		/// var fp = new Ext.form.FormPanel({
		/// ...
		/// buttons: [{
		/// text: &apos;Save&apos;,
		/// formBind: true,
		/// handler: function(){
		/// if(fp.getForm().isValid()){
		/// fp.getForm().submit({
		/// url: &apos;form-submit.php&apos;,
		/// waitMsg: &apos;Submitting your data...&apos;,
		/// success: function(form, action){
		/// // server responded with success = true
		/// var result = action.{@link #result};
		/// },
		/// failure: function(form, action){
		/// if (action.{@link #failureType} === Ext.form.Action.{@link #CONNECT_FAILURE}) {
		/// Ext.Msg.alert(&apos;Error&apos;,
		/// &apos;Status:&apos;+action.{@link #response}.status+&apos;: &apos;+
		/// action.{@link #response}.statusText);
		/// }
		/// if (action.failureType === Ext.form.Action.{@link #SERVER_INVALID}){
		/// // server responded with success = false
		/// Ext.Msg.alert(&apos;Invalid&apos;, action.{@link #result}.errormsg);
		/// }
		/// }
		/// });
		/// }
		/// }
		/// },{
		/// text: &apos;Reset&apos;,
		/// handler: function(){
		/// fp.getForm().reset();
		/// }
		/// }]
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("failureType")]
		[IntrinsicProperty()]
		public string FailureType
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>The XMLHttpRequest object used to perform the action.</summary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("response")]
		[IntrinsicProperty()]
		public object Response
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>
		/// The decoded response object containing a boolean success property and
		/// other, action-specific properties.
		/// </summary>
		/// <htmlSummary>
		/// The decoded response object containing a boolean &lt;tt style=&quot;font-weight:bold&quot;&gt;success&lt;/tt&gt; property and
		/// other, action-specific properties.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\Action.js</definedin>
		[ScriptName("result")]
		[IntrinsicProperty()]
		public object Result
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
	}
}
